package modelx

import (
	"time"
)

type UserInfo struct {
	ID        uint      `json:"id" gorm:"primaryKey"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`

	Phone    string `gorm:"uniqueIndex;size:20;not null"` // 登录账号
	Password string `gorm:"size:255"`                     // 密码哈希，第三方登录可为空

	Nickname string `gorm:"size:50"`
	Gender   string `gorm:"size:10"` // male / female / other
	Birthday time.Time
	Location string `gorm:"size:100"` // 地区，省市

	AvatarURL string `gorm:"size:255"`
	Bio       string `gorm:"size:500"`

	Height        uint
	Weight        uint
	Education     string `gorm:"size:50"`
	Job           string `gorm:"size:100"`
	Income        string `gorm:"size:50"`
	MaritalStatus string `gorm:"size:20"` // 未婚/离异/丧偶
	HasChildren   bool
	House         bool
	Car           bool

	VerifiedReal  bool
	VerifiedVideo bool
}

func (u UserInfo) TableName() string {
	return "user_info"
}
